﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ReportCriteria.aspx.cs" Inherits="HTComics.Web.Admin.SalesReport" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <link href="../Css/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(document).ready(doOnLoad);

        function doOnLoad() {
            $("#btnAdminHome").button().click(function () { window.location = "Home.aspx"; return false; });
            $("#MainContent_btnRun").button().click(function () {
                var startDate, endDate;
                startDate = $("#MainContent_ddlSYear").val() + "-" + $("#MainContent_ddlSMon").val() + "-" + $("#MainContent_ddlSDay").val();
                endDate = $("#MainContent_ddlEYear").val() + "-" + $("#MainContent_ddlEMon").val() + "-" + $("#MainContent_ddlEDay").val();
                window.location = "SalesReport.aspx?startDate=" + startDate + "&endDate=" + endDate; return false;
            });
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Heading" runat="server">
Report Criteria
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <div class="section">
        <span class="header">
            Select Date / Time
        </span>

        <div class="content">
            <table width="100%">
                <tr>
                    <td width="30%">Start Date</td>
                    <td>
                        <asp:DropDownList ID="ddlSDay" runat="server" CssClass="dropdown"></asp:DropDownList>
                        <asp:DropDownList ID="ddlSMon" runat="server" CssClass="dropdown"></asp:DropDownList>
                        <asp:DropDownList ID="ddlSYear" runat="server" CssClass="dropdown"></asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>End Date</td>
                    <td>
                        <asp:DropDownList ID="ddlEDay" runat="server" CssClass="dropdown"></asp:DropDownList>
                        <asp:DropDownList ID="ddlEMon" runat="server" CssClass="dropdown"></asp:DropDownList>
                        <asp:DropDownList ID="ddlEYear" runat="server" CssClass="dropdown"></asp:DropDownList>
                    </td>
                </tr>                
                <tr>
                    <td colspan="2" align="center">
                        <br />
                        <asp:Button ID="btnRun" runat="server" Text="Generate Report" 
                            onclick="btnRun_Click" /></button>
                        <button id="btnAdminHome">Admin Home</button>
                    </td>
                </tr>
            </table>        
        </div>
    </div>

</asp:Content>
